
> #########################################################
> #Figure 1: Euroscepticism Distribution Among Remain Voters
> #########################################################
> 
> d <- read.dta13("./temp/fig1data.dta")

> d <- d[d$leaveW9 == 0,]

> vars <- c("EUIntegrationSelfW8" )

> d <- d[vars]

> d <- na.omit(d)

> ggplot(d, aes(as.factor(EUIntegrationSelfW8))) + 
+   geom_bar(aes(y = (..count..)/sum(..count..)), color="white", fill="gray40", alpha=.9, width = .7) + 
+   scale_y_continuous(labels = scales::percent_format(accuracy = 1L), limits=c(0,.2)) + coord_flip() + xlab(" ") + ylab("Percent") + theme_nice() +
+   theme(axis.title = element_text(size=20),
+         axis.text = element_text(size=17),
+         panel.grid.minor = element_blank(),
+         panel.grid.major.y = element_blank(),
+         panel.grid.major.x=element_line(linetype="solid"))  

> ggsave("./figures/fig1.pdf")

> rm(d, vars)

> #########################################################
> #Figure 2: Wealth Increases Leave Support
> #########################################################
> 
> data <- read.dta13("./temp/fig2data.dta")

> data <- data[2:3,]

> data$type <- c(0,1)

> ggplot(data, aes(as.factor(type), coef)) + 
+   geom_pointrange(aes(ymin=coef-1.96*stderr, ymax=coef + 1.96*stderr), shape=16, size=1.7, color= "gray40") +
+   geom_hline(yintercept = 0, color="red", lwd=1.2) + 
+   theme_nice() + ylab("Effect on Leave Support") + xlab("Wealth Type") + 
+   theme(axis.title = element_text(size=14),
+         axis.text = element_text(size=12),
+         panel.grid.minor = element_blank(),
+         panel.grid.major.y = element_blank(),
+         panel.grid.major.x = element_line(linetype="solid")) + 
+   scale_x_discrete(labels=c("Financial", "Property"))   + 
+   scale_y_continuous(breaks=c(-.05, -0.02, 0, 0.02, 0.05) , limits=c(-.05,.08)) + coord_flip() 

> ggsave("./figures/fig2.pdf")

> rm(data)

> #########################################################
> #Figure 3: Expectations of Brexit Effect on National vs Personal Finances (BES)
> #########################################################
> 
> 
> data2 <- read.dta13("./temp/fig3data.dta")

> data2$varorder <- c(1,2,3,4,1,2,3,4)

> data2$group <- c(1,1,1,1,2,2,2,2)

> ggplot(data2, aes(as.factor(varorder), coef, color=as.factor(group))) + 
+   geom_line(aes(group = group, color=as.factor(group)), linetype="solid", lwd=1.2) +
+   geom_pointrange(aes(ymin=coef-1.96*stderr, ymax=coef + 1.96*stderr), shape=16, size=.8) +
+   scale_color_manual(values=c("gray40",  "tan"), 
+                      labels=c("Personal", "National"), name=" ") + 
+   scale_x_discrete(labels=c("-1","0", "1", "2")) +
+   theme_nice() + ylab("No Change in Circumstances Expected from Leave") + xlab("Property Wealth") + 
+   theme(axis.title = element_text(size=14),
+         axis.text = element_text(size=12),
+         panel.grid.major = element_line(linetype="solid"))  

> ggsave("./figures/fig3.pdf")

> rm(data2)

> #########################################################
> #Figure 4: Wealth Increases Leave Support
> #########################################################
> 
> boe <- read.dta13("./temp/fig4data.dta")

> boe<- boe[2:3,]

> ggplot(boe, aes(as.factor(var), coef)) + 
+   geom_pointrange(aes(ymin=coef-1.96*stderr, ymax=coef + 1.96*stderr), shape=16, size=1.5, color="grey40") +
+   geom_hline(yintercept = 0, color="red", lwd=1.2) + 
+   theme_nice() + ylab("Effect on Leave Support") + xlab("Wealth Type") + 
+   theme(axis.title = element_text(size=14),
+         axis.text = element_text(size=12) ,
+         panel.grid.major.y = element_blank(),
+         panel.grid.major.x = element_line(linetype="solid")) + 
+   scale_x_discrete(labels=c("Financial", "Property")) + 
+   scale_y_continuous(breaks=c(-.1,0,0.5,0.1, 0.2), limits=c(-.1,.25)) + 
+   coord_flip()  

> ggsave("./figures/fig4.pdf")

> rm(boe)

> #########################################################
> #Figure 5: Expectations of Brexit Effect on National vs Personal Finances (BoE)
> #########################################################
> 
> boeme2 <- read.dta13("./temp/fig5data.dta")

> boeme2$varorder <- c(1,2,3,4,1,2,3,4)

> boeme2$group <- c(1,1,1,1,2,2,2,2)

> ggplot(boeme2, aes(as.factor(varorder), coef, color=as.factor(group))) + 
+   geom_line(aes(group = group, color=as.factor(group)), linetype="solid", lwd=1.2) +
+   geom_pointrange(aes(ymin=coef-1.96*stderr, ymax=coef + 1.96*stderr), shape=16, size=.8) +
+   scale_color_manual(values=c("gray40",  "tan"), 
+                      labels=c("Personal", "National"), name=" ") + 
+   scale_x_discrete(labels=c("-1","0", "1", "2")) +
+   theme_nice() + ylab("No Change in Circumstances Expected from Leave") + xlab("Property Wealth") + 
+   theme(axis.title = element_text(size=14),
+         axis.text = element_text(size=12),
+         panel.grid.major = element_line(linetype="solid"))  +
+   scale_y_continuous(breaks=c(0.2,0.3,.4,.5,.6,.7), limits=c(0.2,0.7))

> ggsave("./figures/fig5.pdf")

> rm(boeme2)

> #########################################################
> #Figure 6: Wealth Increases Leave Support
> #########################################################
> 
> bexp <- read.dta13("./temp/fig6data.dta")

> ggplot(bexp, aes(as.factor(var), coef, color=var)) +
+   geom_pointrange(aes(ymin=coef-1.96*stderr, ymax=coef + 1.96*stderr), shape=16, size=1.7) +
+   theme_nice() + ylab("Leave Support") + xlab("Treatment Condition")  + 
+   scale_y_continuous(breaks=c(5.8,6.1,6.4,6.7), limits = c(5.8,6.8)) + 
+   scale_x_discrete(labels=c("Control", "Treatment")) + 
+   scale_color_manual(values=c("grey40", "tan"), name=" ") + 
+   theme(axis.title = element_text(size=17),
+         axis.text = element_text(size=15),
+         panel.grid.major = element_line(linetype="solid"),
+         legend.position = "none")   

>   ggsave("./figures/fig6.pdf")

>   rm(bexp)

> #########################################################
> #Figure 7: Wealth Treatment Decreases Risk Aversion
> #########################################################
> 
> brisk <- read.dta13("./temp/fig7data.dta")

> ggplot(brisk, aes(as.factor(var), coef, color=var)) +
+   geom_pointrange(aes(ymin=coef-1.96*stderr, ymax=coef + 1.96*stderr), shape=16, size=1.7) +
+   theme_nice() + ylab("Willingness to Take Risks") + xlab("Treatment Condition")  + 
+   scale_y_continuous(breaks=c(2.1,2.2, 2.3, 2.4), limits = c(2.1,2.45)) + 
+   scale_x_discrete(labels=c("Control", "Treatment")) + 
+   scale_color_manual(values=c("grey40", "tan"), name=" ") + 
+   theme(axis.title = element_text(size=17),
+         axis.text = element_text(size=15),
+         panel.grid.major = element_line(linetype="solid"),
+         legend.position = "none") 

> ggsave("./figures/fig7.pdf")

> rm(brisk)

> #########################################################
> #Figure D1: Main Results with DK
> #########################################################
> 
> datadk <- read.dta13("./temp/figd1data.dta")

> datadk<- datadk[25,]

> datadk$type <- c(0)

> ggplot(datadk, aes(as.factor(type), coef)) + 
+   geom_pointrange(aes(ymin=coef-1.96*stderr, ymax=coef + 1.96*stderr), shape=16, size=1.7, color= "gray40") +
+   geom_hline(yintercept = 0, color="red", lwd=1.2) + 
+   theme_nice() + ylab("Effect on Leave Support") + xlab("Wealth Type DK") + 
+   theme(axis.title = element_text(size=14),
+         axis.text = element_text(size=12),
+         panel.grid.minor = element_blank(),
+         panel.grid.major.y = element_blank(),
+         panel.grid.major.x = element_line(linetype="solid")) + 
+   scale_x_discrete(labels=c("Property Wealth"))   + 
+   scale_y_continuous(breaks=c(-.2, -0.1, 0, 0.1, 0.2) , limits=c(-.2,.2)) + coord_flip() 

> ggsave("./figures/figd1.pdf")

> rm(datadk)

> #########################################################
> #Figure D2: Main Results Controlling for Alternative Explanations
> #########################################################
> 
> dataaltexp <- read.dta13("./temp/figd2data_toplot.dta")

> dataaltexp$type <- c("Euroscepticism", "Euroscepticism", "Risk of Unemployment", "Risk of Unemployment")

> ggplot(dataaltexp, aes(as.factor(var), coef)) + 
+   geom_pointrange(aes(ymin=coef-1.96*stderr, ymax=coef + 1.96*stderr), shape=16, size=1.7, color= "gray40") +
+   geom_hline(yintercept = 0, color="red", lwd=1.2) + 
+   theme_nice() + ylab("Effect on Leave Support") + xlab("Wealth Type") + 
+   facet_wrap(~type) +
+   theme(axis.title = element_text(size=14),
+         axis.text = element_text(size=12),
+         panel.grid.minor = element_blank(),
+         panel.grid.major.y = element_blank(),
+         panel.grid.major.x = element_line(linetype="solid")) + 
+   scale_x_discrete(labels=c("Financial", "Property"))   + 
+   scale_y_continuous(breaks=c(-.04, -0.02, 0, 0.02, 0.04) , limits=c(-.03,.04)) + coord_flip() 

> ggsave("./figures/figd2.pdf")

> rm(dataaltexp)

> #########################################################
> #Figure D3: Mechanism Results with Different Expectations
> #########################################################
> 
> data <- read.dta13("./temp/figd3data.dta")

> data<- data[data$var=="z_p_wealth",]

> data$type <- c("national","personal")

> ggplot(data, aes(as.factor(type), coef)) + 
+   geom_pointrange(aes(ymin=coef-1.96*stderr, ymax=coef + 1.96*stderr), shape=16, size=1.7, color= "gray40") +
+   geom_hline(yintercept = 0, color="red", lwd=1.2) + 
+   theme_nice() + ylab("Wealth Effect on Expectations from Leave") + xlab("Expectations Type") + 
+   theme(axis.title = element_text(size=14),
+         axis.text = element_text(size=12),
+         panel.grid.minor = element_blank(),
+         panel.grid.major.y = element_blank(),
+         panel.grid.major.x = element_line(linetype="solid")) + 
+   scale_x_discrete(labels=c("National Circumstances", "Personal Circumstances"))   + 
+   scale_y_continuous(breaks=c(-.05, -0.02, 0, 0.02, 0.05) , limits=c(-.05,.08)) + coord_flip() 

> ggsave("./figures/figd3.pdf")

> rm(data)
